import Compoent.AComponent;
import Compoent.PictureView;
import Compoent.TextView;
import Decorator.BorderADecorator;
import Decorator.ScrollADecorator;

public class Main {
    public static void main(String[] args) {
        AComponent textView = new TextView();

        AComponent scrollTextView = new ScrollADecorator(textView);
        System.out.println("带滚动条的文本显示组件：");
        scrollTextView.display();

        AComponent borderTextView = new BorderADecorator(textView);
        System.out.println("\n带黑色边框的文本显示组件：");
        borderTextView.display();

        AComponent scrollBorderTextView = new BorderADecorator(new ScrollADecorator(textView));
        System.out.println("\n带滚动条和黑色边框的文本显示组件：");
        scrollBorderTextView.display();

        AComponent pictureView = new PictureView();

        AComponent scrollBorderPictureView =new BorderADecorator(new BorderADecorator(new ScrollADecorator(pictureView)));
        System.out.println("\n带滚动条和两层黑色边框的图片显示组件：");
        scrollBorderPictureView.display();
    }
}